<?php include("includes/session.php"); ?>
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title><?php echo $lang['PAGE_TITLE_EDIT_PROJECT']; ?></title>
<?php include('header.php'); ?>
<?php
if(!$session->logged_in)
{
?>
	<br />
	<center>
	<table cellpadding="0" cellspacing="0" width="70%">
	<tr>
		<td class="topLeft"></td><td bgcolor="#dadada"></td><td class="topRight"></td>
	</tr>
	<tr bgcolor="#dadada">
	<td></td><td>
		<center><b>You Are Not Logged In</b></center><br />
		<center>Please <a href="index.php">Log In</a> to View This Page, or <a href="register.php">Register</a> Now. </center><br />
		<center>Thank You.</center>
	</td><td></td>
	</tr>
	<tr>
		<td class="bottomLeft"></td><td bgcolor="#dadada"></td><td class="bottomRight"></td>
	</tr>
	</table>
	</center>
<?php
}
else
{
?>
<table cellpadding="20" cellspacing="0" width="100%">
<tr><td>
	<center>
	<table cellpadding="0" cellspacing="0" width="100%">
	<tr>
		<td class="topLeft"></td><td bgcolor="#dadada"></td><td class="topRight"></td>
	</tr>
	<tr bgcolor="#dadada">
	<td></td><td>
		<?php displayOwnerProjects($session->username); ?>
	</td><td></td>
	</tr>
	<tr>
		<td class="bottomLeft"></td><td bgcolor="#dadada"></td><td class="bottomRight"></td>
	</tr>
	</table>
	</center>
	<br />
	<?php displayMemberProjects($session->username); ?>
	<center>
	<table cellpadding="0" cellspacing="0">
	<tr>
		<td class="topLeft"></td><td bgcolor="#dadada"></td><td class="topRight"></td>
	</tr>
	<tr bgcolor="#dadada">
	<td></td><td>
		<center><font size="+1"><b><?php echo $lang['EDIT_PROJECT_ADD_PROJECT']; ?></b></font></center>
		<?php
		if($form->num_errors>0)
		{
			echo "<center><font size=\"2\" color=\"#ff0000\">Errors: ".$form->num_errors."</font></center>";
		}
		?>
		<center>
		These should be projects that you want a group of people to join<br />or to find people with the same interests.
		</center>
		<br />
		<center>
		<form action="includes/process.php" method="POST">
		<input name="subAddProject" type="hidden" value="<?php echo $session->username; ?>" />
		<table cellpadding="5" cellspacing="0">
		<tr>
			<td valign="top"><b><?php echo $lang['EDIT_PROJECT_ADD_PROJECT_NAME']; ?></b><?php echo $form->error("name"); ?></td>
		</tr>
		<tr>
			<td><input name="name" type="text" size="66" maxlength="50" /></td>
		</tr>
		<tr>
			<td valign="top"><b><?php echo $lang['EDIT_PROJECT_ADD_PROJECT_DESC']; ?></b><?php echo $form->error("description"); ?></td>
		</tr>
		<tr>
			<td><textarea name="description" cols="50" rows="8"></textarea></td>
		</tr>
		<tr>
			<td align="right">
				<table cellpadding="0" cellspacing="0" width="80%">
				<tr>
					<td><input type="radio" checked="checked" name="isPrivate" value="0"><?php echo $lang['EDIT_PROJECT_ADD_PROJECT_PUBLIC']; ?></td>
					<td><input type="radio" name="isPrivate" value="1"><?php echo $lang['EDIT_PROJECT_ADD_PROJECT_PRIVATE']; ?></td>
					<td align="right"><input type="submit" value="Start Project" /></td>
				</tr>
				</table>
			</td>
		</tr>
		</table>
		</form>
		</center>
	</td><td></td>
	</tr>
	<tr>
		<td class="bottomLeft"></td><td bgcolor="#dadada"></td><td class="bottomRight"></td>
	</tr>
	</table>
	</center>
</td></tr>
</table>
<?php
}
?>
<?php include("footer.php"); ?>